1. Field of the Invention
The present invention relates to an optical encoder capable of providing a stable-amplitude signal.
2. Description of the Related Art
A photoelectric encoder basically has a main scale having a first optical grating formed thereon, an index scale opposing the main scale and having a second optical grating formed thereon, a light-emitting device for emitting light to the main scale, and a light-receiving device for receiving the light that is transmitted through or reflected from the optical grating of the main scale and then is transmitted through the optical grating of the index scale. Photoelectric encoders that use arrays of light-receiving devices serving as the index scales have already been proposed.
FIG. 10 is a diagram schematically showing a known photoelectric encoder. FIG. 11 is a cross-sectional view of a light-detecting-side grating substrate of the known photoelectric encoder. Referring to FIGS. 10 and 11, light-receiving portions 258 are formed in stripes at a predetermined pitch on a light-detecting-side grating substrate 232. Each light-receiving portion 258 includes a first conductive signal layer 252, a PN semiconductor layer 254, and a second conductive signal layer 256 layered on a light-transmissive base material 250. The first conductive signal layer 252 is made of a light-blocking and conductive material, such as a metallic film. At the PN semiconductor layer 254, light rays are converted into electrical signals. The second conductive signal layer 256 is made of a light-transmissive and conductive material, such as In2O3, SnO2, Si, or a mixture thereof. The light-transmissive base material 250 is made of, for example, glass. The light-receiving portions 258 oppose a main scale 224. The light-receiving portions 258 provide slits.
The light rays transmitted through the second conductive signal layer 256 in the light-receiving portion 258 are incident on the PN semiconductor layer 254. The light rays are photoelectrically converted at the boundary surface between an N-type amorphous silicon film 260 and a P-type amorphous silicon film 262. The photoelectrically-converted light rays are output from the light-detecting-side grating substrate 232 via output terminals 264 and 266.
A light-emitting-side grating substrate 230 is integrally formed with light-emitting devices 212, and the light-detecting-side grating substrate 232 is integrally formed with the light-receiving portions 258. This allows for a photoelectric encoder that has a reduced number of parts and, therefore, is compact and light-weight.
FIG. 12 illustrates a relationship between an example pattern of a photodiode array used in the photoelectric encoder shown in FIGS. 10 and 11 and a contrast pattern of the detected light. Referring to FIG. 12, photodiode groups S1 to S4 are arranged out of phase with the contrast pattern by 0°, 90°, 180°, and 270°, respectively. FIG. 13 is a block diagram of a signal processing circuit for the signals from the photodiode groups S1 to S4 in FIG. 12.
The photodiode groups S1 to S4 supply signals to current-to-voltage converters 300a to 300d for converting a current into a voltage. The signals converted by the current-to-voltage converters 300a to 300d are out of phase with the contrast pattern by 0°, 90°, 180°, and 270°. Differentially amplifying the signals from the photodiode groups S1 and S3 via a differential amplifier 301a provides an analog sinusoidal voltage signal A that is out of phase with the contrast pattern by 0°, and differentially amplifying the signals from the photodiode groups S2 and S4 via a differential amplifier 301b provides an analog sinusoidal voltage signal B that is out of phase with the contrast pattern by 90°.
Actual encoders use the analog sinusoidal voltage signals A and B without conversion, or use digital signals converted from the analog sinusoidal voltage signals A and B and supplied to processing circuits, such as counter circuits, through comparators.
However, in such a photoelectric encoder, a variation in the light-emitting device or the light-receiving device, the positional relation between the scale and the optical system, or an optical variation causes the amplitude of the output from the encoder to be unstable while the scale is operating or owing to deterioration with age.
In order to solve the problem, measures are taken in which the maximum and minimum values of the sinusoidal signal output from the encoder are detected by moving a movable body, the amplitude is calculated from the difference between the maximum value and the minimum value, and the amplitude is adjusted by using a resistor or the like so as to set the amplitude to a reference level.
However, there is a problem with such measures in that the amplitude cannot be detected unless the movable body moves by one pitch, that is, by one cycle of the sinusoidal signal.
Although there is a method of calculating the amplitude from the sum of squares of the analog sinusoidal voltage signals A and B, this calculation is complicated and the circuit size is increased if an analog circuit is used. In addition, it can take a long time to perform arithmetic processing, thus possibly causing a delay in the detection result when the amplitude varies greatly.